package com.tuweiya.study.springmvc001.eventBus.observer;

import com.google.common.eventbus.Subscribe;

/**
 * @Author: Mr_tu
 * @Date: Create in 14:35 2018/6/7
 * @Description: 观察者1
 */
public class DataObserver1 {


    /**
     * 只有通过@Subscriber 注解的方法才会被注册到EventBus中
     * 而且方法只能有一个参数
     * @param msg
     */
    @Subscribe
    public void func(String msg) throws InterruptedException {
        Thread.sleep(1000);
        System.out.println("String msg:" + msg);
    }



}
